<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@page isELIgnored="false" %>
<html>
<head>
    <title>登录</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <!--css文件-->
    <jsp:include page="common/common-css.jsp" />
</head>
<body>

<jsp:include page="common/common-mobileButton.jsp" />

<div class="main-wrapper">
    <!--页面导航栏组件-->
    <jsp:include page="common/common-header.jsp" />

    <main class="main-content">
        <div class="login-register-area section-space-y-axis-100">
            <div class="container">
                <div class="row">

                    <div align="center">

                        <c:if test="${!empty msg}">
                            <div class="alert alert-success" style="text-align: center; width: 280px;margin-right: 14px;">${msg}</div>
                        </c:if>

                        <c:if test="${!empty failMsg}">
                            <div class="alert alert-danger" style="text-align: center; width: 280px;margin-right: 14px;">${failMsg}</div>
                        </c:if>

                        <form id="login_form" action="/bookmall/login" method="post">
                            <div class="login-form">
                                <div class="row">
                                    <h4 class="login-title" style="color: #abd373">登录</h4>

                                    <div class="form-group">
                                        <label for="userName" class="control-label">用户名</label>
                                        <div class="col-sm-6">
                                            <input type="text" class="form-control" id="userName" name="userName"
                                                   placeholder="请输入用户名" required="required" autocomplete="off">
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label for="password" class="control-label">密码</label>
                                        <div class="col-sm-6">
                                            <input type="password" class="form-control" id="password" name="password"
                                                   placeholder="请输入密码" required="required" autocomplete="off">
                                        </div>
                                    </div>
                                </div>
                                <div class="col-lg-12 pt-5">
                                    <button class="btn btn-custom-size lg-size btn-pronia-primary" type="button" onclick="validateLogin()">
                                        登录
                                    </button>
                                </div>
                            </div>
                        </form>
                    </div>

                </div>
            </div>
        </div>
    </main>
    <!--页尾-->
    <jsp:include page="footer.jsp" />
</div>

<!--js文件-->
<jsp:include page="common/common-js.jsp" />

<script>
    $(function () {
        //禁用“确认重新提交表单”
        window.history.replaceState(null, null, window.location.href);
    })

</script>

</body>
</html>
